<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>07-Promise自定义封装-all方法封装</title>
  <script src="./07-Promise自定义封装-all方法封装.js"></script>
</head>
<body>
  <script>
    let p1 = new Promise((resolve,reject)=>{
      resolve('hello p1')
    })
    let p2 = new Promise((resolve,reject)=>{
      setTimeout(() => {
        resolve('hello p2')
      }, 2000);
    })
    // let p3 = Promise.resolve('hello p3');
    let p3 = Promise.reject('hello p3');
    let p4 = Promise.resolve('hello p4');
    let ars = Promise.all([p1,p2,p3,p4]);
    console.log(ars);
  </script>
</body>
</html>